﻿<%@ Page Language="C#" MasterPageFile="~/Company/MasterPage.master" AutoEventWireup="true" CodeFile="UserListReply.aspx.cs" Inherits="Company_UserListReply" Title="无标题页" %>

<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
        var template = '<span style="color:{0};">{1}</span>';

        var Shenhe = function (value) {
            if(value==0){return String.format(template,'red', '未审');}
            if(value==1){return String.format(template,'green', '同意');}
            if(value==2){return String.format(template,'blue', '退回');}
        }
    </script>
    <ext:Store ID="Store1" OnRefreshData="Store1_OnRefreshData" runat="server">
    <Reader>
        <ext:JsonReader ReaderID="id">
            <Fields>
                <ext:RecordField Name="id" Type="Int"></ext:RecordField>
                <ext:RecordField Name="companyid" Type="String"></ext:RecordField>
                <ext:RecordField Name="companyname" Type="String"></ext:RecordField>
                <ext:RecordField Name="enter_username" Type="String"></ext:RecordField>
                <ext:RecordField Name="enter_deptname" Type="String"></ext:RecordField>
                <ext:RecordField Name="dept_master_status" Type="Int"></ext:RecordField>
                <ext:RecordField Name="manager_status" Type="Int"></ext:RecordField>
                <ext:RecordField Name="other_master_status" Type="Int"></ext:RecordField>
                <ext:RecordField Name="intime" Type="Date"></ext:RecordField>
            </Fields>
        </ext:JsonReader>
    </Reader>
     <AutoLoadParams>
         <ext:Parameter Name="start" Mode="Raw" Value="0" />
         <ext:Parameter Name="limit" Mode="raw" Value="25" />
     </AutoLoadParams>
    </ext:Store>
    <ext:Store ID="Store2" runat="server">
    <Reader>
        <ext:JsonReader ReaderID="uid">
            <Fields>
                <ext:RecordField Name="uid" Type="Int"></ext:RecordField>
                <ext:RecordField Name="username" Type="String"></ext:RecordField>
            </Fields>
        </ext:JsonReader>
    </Reader>
    </ext:Store>
    <ext:Store ID="Store3" runat="server">
    <Reader>
        <ext:JsonReader ReaderID="uid">
            <Fields>
                <ext:RecordField Name="uid" Type="Int"></ext:RecordField>
                <ext:RecordField Name="username" Type="String"></ext:RecordField>
            </Fields>
        </ext:JsonReader>
    </Reader>
    </ext:Store>
    <ext:ViewPort ID="ViewPort1" runat="server">
        <Body>
           <ext:ColumnLayout ID="ColumnLayout1" runat="server" Split="true" FitHeight="true">
                <Columns>
                 <ext:LayoutColumn ColumnWidth="0.5">
                      <ext:GridPanel StoreID="Store1" ID="GridPanel1" runat="server">
                      <ColumnModel>
                        <Columns>
                            <ext:Column ColumnID="id" DataIndex="id" Header="系统编号"></ext:Column>
                            <ext:Column ColumnID="companyid" DataIndex="companyid" Header="户号"></ext:Column>
                            <ext:Column ColumnID="companyname" DataIndex="companyname" Header="户名"></ext:Column>
                            <ext:Column ColumnID="enter_username" DataIndex="enter_username" Header="提交人"></ext:Column>
                            <ext:Column ColumnID="enter_deptname" DataIndex="enter_deptname" Header="提交部门"></ext:Column>
                            <ext:Column ColumnID="dept_master_status" DataIndex="dept_master_status" Header="部门领导">
                                <Renderer Fn="Shenhe" />
                            </ext:Column>
                            <ext:Column ColumnID="other_master_status" DataIndex="other_master_status" Header="相关领导">
                                <Renderer Fn="Shenhe" />
                            </ext:Column>
                            <ext:Column ColumnID="manager_status" DataIndex="manager_status" Header="公司领导">
                                <Renderer Fn="Shenhe" />
                            </ext:Column>
                            <ext:Column ColumnID="intime" Width="180" DataIndex="intime" Header="时间">
                                 <Renderer Fn="Ext.util.Format.dateRenderer('Y-m-d')" />
                            </ext:Column>
                        </Columns>
                      </ColumnModel>
                      <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
                            <AjaxEvents>
                                <RowSelect OnEvent="RowSelect" Buffer="250">
                                    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{FormPanel1}" />
                                    <ExtraParams>
                                        <%-- or can use params[2].id as value --%>
                                        <ext:Parameter Name="id" Value="this.getSelected().id" Mode="Raw" />
                                    </ExtraParams>
                                </RowSelect>
                            </AjaxEvents>
                        </ext:RowSelectionModel>
                    </SelectionModel>
                    <BottomBar>
                        <ext:PagingToolBar 
                            ID="PagingToolBar1" 
                            runat="server" 
                            PageSize="10" 
                            StoreID="Store1" 
                            />
                    </BottomBar>
                      </ext:GridPanel>
                 </ext:LayoutColumn>
                    
                    <ext:LayoutColumn ColumnWidth="0.5">
                    <ext:FormPanel Height="500" ID="FormPanel1" AutoScroll="true" runat="server" BodyStyle="padding:5px;" ButtonAlign="Right"
                        Frame="true" >
                        <Body>
                            <ext:Panel ID="Panel1" runat="server" AutoHeight="true" Collapsed="true"  FormGroup="true" Title="用电客户">
                                    <Body>
                                    <ext:Hidden ID="tfid" runat="server"></ext:Hidden>
                                    <ext:Hidden ID="guid" runat="server"></ext:Hidden>
                                    <table border="0" width="100%" cellpadding="10" cellspacing="10">
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >户号:</td>
                                            <td style="text-align:left;"><ext:Label ID="tfcompanyid" runat="server"></ext:Label> </td>
                                        </tr>
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >户名:</td>
                                            <td style="text-align:left;"><ext:Label ID="tfcompanyname" runat="server"></ext:Label> </td>
                                        </tr>
                                    </table>         
                                    </Body>
                                </ext:Panel>
                                <ext:Panel ID="Panel2" runat="server" AutoHeight="true" Collapsed="true"  FormGroup="true" Title="欠费">
                                    <Body>
                                    <table border="0" width="100%" cellpadding="10" cellspacing="10">
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >时间:</td>
                                            <td style="text-align:left;"><ext:Label runat="server" ID="tfunfee_time"></ext:Label> </td>
                                        </tr>
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >金额:</td>
                                            <td style="text-align:left;"> 
                                                <ext:Label ID="tfunfee_cash"   runat="server">
                                                </ext:Label> </td>
                                        </tr>
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >情况说明:</td>
                                            <td style="text-align:left;"> 
                                                <ext:Label  runat="server" ID="tfunfee_detail"></ext:Label> </td>
                                        </tr>
                                    </table>         
                                    </Body>
                                </ext:Panel>
                                <ext:Panel ID="Panel3" runat="server" AutoHeight="true" Collapsed="true"  FormGroup="true" Title="窃电">
                                    <Body>
                                    <table border="0" width="100%" cellpadding="10" cellspacing="10">
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >时间:</td>
                                            <td style="text-align:left;"><ext:Label runat="server" ID="tfthief_time1"></ext:Label>~<ext:Label runat="server" ID="tfthief_time2"></ext:Label> </td>
                                        </tr>
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >金额:</td>
                                            <td style="text-align:left;"> 
                                                <ext:Label ID="tfthief_cash"   runat="server">
                                                </ext:Label> </td>
                                        </tr>
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >情况说明:</td>
                                            <td style="text-align:left;"> 
                                                <ext:Label  runat="server" ID="tfthief_detail"></ext:Label> </td>
                                        </tr>
                                    </table>         
                                    </Body>
                                </ext:Panel>
                                <ext:Panel ID="Panel4" runat="server" AutoHeight="true" Collapsed="true"  FormGroup="true" Title="不配合错峰">
                                    <Body>
                                    <table border="0" width="100%" cellpadding="10" cellspacing="10">
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >时间:</td>
                                            <td style="text-align:left;"><ext:Label runat="server" ID="tfuncoop_peak_time"></ext:Label></td>
                                        </tr> 
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >情况说明:</td>
                                            <td style="text-align:left;"> 
                                                <ext:Label  runat="server" ID="tfuncoop_peak_detail"></ext:Label> </td>
                                        </tr>
                                    </table>         
                                    </Body>
                                </ext:Panel>
                                <ext:Panel ID="Panel5" runat="server" AutoHeight="true" Collapsed="true"  FormGroup="true" Title="不配合限电">
                                    <Body>
                                    <table border="0" width="100%" cellpadding="10" cellspacing="10">
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >时间:</td>
                                            <td style="text-align:left;"><ext:Label runat="server" ID="tfuncoop_limit_time"></ext:Label></td>
                                        </tr> 
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >情况说明:</td>
                                            <td style="text-align:left;"> 
                                                <ext:Label  runat="server" ID="tfuncoop_limit_detail"></ext:Label> </td>
                                        </tr>
                                    </table>         
                                    </Body>
                                </ext:Panel>
                                <ext:Panel ID="Panel6" runat="server" AutoHeight="true" Collapsed="true"  FormGroup="true" Title="其他不良行为">
                                    <Body>
                                    <table border="0" width="100%" cellpadding="10" cellspacing="10">
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >情况说明:</td>
                                            <td style="text-align:left;"> 
                                                <ext:Label  runat="server" ID="tfuncoop_others"></ext:Label> </td>
                                        </tr>
                                    </table>         
                                    </Body>
                                </ext:Panel>
                                <ext:Panel ID="Panel9" runat="server" AutoHeight="true" Collapsed="true"  FormGroup="true" Title="附件">
                                    <Body>
                                    <table border="0" width="100%" cellpadding="10" cellspacing="10">
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >详细：</td>
                                            <td style="text-align:left;"><ext:HyperLink runat="server" ID="tffileshow"></ext:HyperLink></td>
                                        </tr>
                                    </table>         
                                    </Body>
                                </ext:Panel>
                                <ext:Panel ID="Panel7" runat="server" AutoHeight="true" Collapsed="true"  FormGroup="true" Title="部门领导意见">
                                    <Body>
                                    <table border="0" width="100%" cellpadding="10" cellspacing="10">
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >审核状态：</td>
                                            <td style="text-align:left;">
                                                 <ext:ComboBox  ID="tfdeptmaster_status" runat="server" EmptyText="请选择" Editable="false">
                                                <Items>
                                                    <ext:ListItem Text="未审核" Value="0" />
                                                    <ext:ListItem Text="同意" Value="1" />
                                                    <ext:ListItem Text="退回" Value="2" />
                                                </Items>
                                            </ext:ComboBox> 
                                            </td>
                                        </tr> 
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >意见:</td>
                                            <td style="text-align:left;"><ext:TextArea  runat="server" Width="250" ID="tfdept_master_remark"></ext:TextArea> </td>
                                        </tr>
                                         <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >公司领导:</td>
                                            <td style="text-align:left;"> <ext:ComboBox ID="tfmanager_id" runat="server"
                                            DisplayField="username" ValueField="uid" Editable="false" StoreID="Store2"></ext:ComboBox></td>
                                        </tr>
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >相关部门领导:</td>
                                            <td style="text-align:left;"> <ext:ComboBox ID="tfother_master_id" runat="server"
                                            DisplayField="username" ValueField="uid" Editable="false" StoreID="Store3"></ext:ComboBox></td>
                                        </tr>
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" ></td>
                                            <td style="text-align:left;">
                                                <ext:Button ID="BtnDeptSub" runat="server" Icon="Disk" Text="提交">
                                                <AjaxEvents>
                                                    <Click OnEvent="SumForm"></Click>
                                                </AjaxEvents>
                                                </ext:Button>
                                            </td>
                                        </tr>
                                    </table>         
                                    </Body>
                                </ext:Panel>
                                <ext:Panel ID="Panel10" runat="server" AutoHeight="true" Collapsed="true"  FormGroup="true" Title="相关领导意见">
                                    <Body>
                                    <table border="0" width="100%" cellpadding="10" cellspacing="10">
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >审核状态：</td>
                                            <td style="text-align:left;">
                                                 <ext:ComboBox  ID="tfother_master_status" runat="server" EmptyText="请选择" Editable="false">
                                                <Items>
                                                    <ext:ListItem Text="未审核" Value="0" />
                                                    <ext:ListItem Text="同意" Value="1" />
                                                    <ext:ListItem Text="退回" Value="2" />
                                                </Items>
                                            </ext:ComboBox> 
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >意见:</td>
                                            <td style="text-align:left;"><ext:TextArea  runat="server" Width="250" ID="tfother_master_remark"></ext:TextArea> </td>
                                        </tr>
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" ></td>
                                            <td style="text-align:left;">
                                                <ext:Button ID="Button1" runat="server" Icon="Disk" Text="提交">
                                                <AjaxEvents>
                                                    <Click OnEvent="subother"></Click>
                                                </AjaxEvents>
                                                </ext:Button>
                                            </td>
                                        </tr>
                                    </table>         
                                    </Body>
                                </ext:Panel>
                                 <ext:Panel ID="Panel8" runat="server" AutoHeight="true" Collapsed="true"  FormGroup="true" Title="公司领导意见">
                                    <Body>
                                    <table border="0" width="100%" cellpadding="10" cellspacing="10">
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >审核状态：</td>
                                            <td style="text-align:left;">
                                                 <ext:ComboBox  ID="tfManager_status" runat="server" EmptyText="请选择" Editable="false">
                                                <Items>
                                                    <ext:ListItem Text="未审核" Value="0" />
                                                    <ext:ListItem Text="同意" Value="1" />
                                                    <ext:ListItem Text="退回" Value="2" />
                                                </Items>
                                            </ext:ComboBox> 
                                            </td>
                                        </tr> 
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" >意见:</td>
                                            <td style="text-align:left;"><ext:TextArea  runat="server" Width="250" ID="tfmanager_remark"></ext:TextArea> </td>
                                        </tr>
                                        <tr>
                                            <td style="width:150px; vertical-align:top;text-align:right;" ></td>
                                            <td style="text-align:left;">
                                                <ext:Button ID="btnmanagersub" runat="server" Icon="Disk" Text="提交">
                                                <AjaxEvents>
                                                    <Click OnEvent="submanager"></Click>
                                                </AjaxEvents>
                                                </ext:Button>
                                            </td>
                                        </tr>
                                    </table>         
                                    </Body>
                                </ext:Panel>
                        </Body>
                    </ext:FormPanel>
                </ext:LayoutColumn>
                 </Columns>
            </ext:ColumnLayout>
        </Body>
    </ext:ViewPort>
</asp:Content>

